<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div class="box">
        <input type="text" v-model="num">
        <h1>{{info}}</h1>
        <h4 v-if="num > 8">{{answer1}}</h4>
        <h4 v-else-if="num > 6">{{answer2}}</h4>
        <h4 v-else>{{answer3}}</h4>
    </div>  
    <script>
        let vm = new Vue({
            el:'.box',
            data:{
                info:'吃个饭吧',
                answer1:'同意',
                answer2:'犹豫',
                answer3:'拒绝',
                //默认值
                num:0
                /*初始值类型
                str:''
                num:0
                beal:true / false
                arr:[]
                obj:{}
                err:null
                */

            }
        })
    </script>
</body>
</html>